package com.mk.exnotice.config;

import com.mk.exnotice.service.MailService;
import com.mk.exnotice.service.MailServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.mail.javamail.JavaMailSender;

@Configuration
public class ExceptionNoticeEmailSendingConfig {

    @Autowired
    private JavaMailSender mailSender;

    @Autowired
    freemarker.template.Configuration configuration;

    @Bean
    public MailService mailService(){
        return new MailServiceImpl(mailSender, configuration);
    }
}
